<%@page import="com.wef.demo.entity.domain.StudentSubjectDomain"%>
<%@page import="com.wef.demo.entity.domain.StudentDomain"%>
<%@page import="com.wef.demo.entity.domain.ClazzDomain"%>
<%@page import="com.wef.demo.entity.domain.SubjectDomain"%>
<%@page import="com.gfa4j.resource.ResourceManagerServer"%>
<%@page import="com.wef.common.util.CommonMessageDomain"%>
<%@page import="com.gfa4j.query.Field"%>
<%@ include file="/pages/common/taglib.jsp"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
		<k:jqgrid 
			queryObjectName="<%=StudentSubjectDomain.StudentSubject%>"
		 	jsonReader="{id:'studentSubjectId'}"
		 	colModel="[{name:'studentSubjectId',hidden:true},
		 		{label:'demo.StudentSubject.subjectCode',name:'subjectCode'},
		 		{label:'demo.StudentSubject.subjectName',name:'subjectName'}]"
			id="tableStudentSubject"
		 	newBtnId="newBtnStudentSubject"
		 	saveBtnId="saveBtnStudentSubject"
		 	cancelBtnId="cancelBtnStudentSubject"
		 	deleteBtnId="deleteBtnStudentSubject"
		 	editFormId="editFormStudentSubject"
		 	serviceMethodName="saveOrUpdateStudentSubjects"
		 	serviceName="StudentSubjectService"
		 	setQueryInfo="setQueryInfo4StudentSubject"
		 	enabledLoad="false"
		 	beforeSave="beforeSave4StudentSubject"
		 	beforeNew="beforeNew4Student"
		 	/>
		 	
		<k:autoSelectConfig 
			url="${ctx}" 
			id="editSubjectName" 
			width="350" 
			autoFill="editSubjectName|{subjectName},editSubjectCode|{subjectCode}" 
			displayField="subjectName,subjectCode" 
			className="com.wef.demo.entity.Subject" 
			displayFieldI18n="demo.Subject.subjectName,demo.Subject.subjectCode" 
			displayNum="8"
			canNotInput="true"
			/>
			
		<script type="text/javascript">
// 			$(window).ready(function(){
// 				alert("item2");
// 				$('div[accordion=true]').accordion({collapsible : true});
// 				$('div[tabGroup=true]').tabs();
// 			});
		</script>
				
<!-- 		<div id="tabItem3"> -->
				<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
					<ul class="button_box">
						<li>
							<k:button styleId="newBtnStudentSubject" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" text="<%=CommonMessageDomain.BUTTON_NEW%>"/>
						</li>
						<li>
							<k:button styleId="saveBtnStudentSubject" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" text="<%=CommonMessageDomain.BUTTON_SAVE%>"/>
						</li>
						<li>
							<k:button styleId="cancelBtnStudentSubject" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" text="<%=CommonMessageDomain.BUTTON_CANCEL%>"/>
						</li>
						<li>
							<k:button styleId="deleteBtnStudentSubject" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" text="<%=CommonMessageDomain.BUTTON_DELETE%>"/>
						</li>
					</ul>
				</div>
				
				<div id="divAccordion5" accordion="true">
					<h1><a href="#"><%=ResourceManagerServer.getInstance().getMessage(StudentSubjectDomain.StudentSubjectNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(CommonMessageDomain.TITLE_TABLE)%></a></h1>
					<div>
						<table id="tableStudentSubject"></table>
					</div>
				</div>
				
				<div id="divAccordion6" accordion="true">
					<h1><a href="#"><%=ResourceManagerServer.getInstance().getMessage(StudentSubjectDomain.StudentSubjectNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(CommonMessageDomain.TITLE_EDIT)%></a></h1>
					<div>
						<form id="editFormStudentSubject" name="editFormStudentSubject">
							<ul id="editUlStudentSubject" allowChange="true" class="edit_box">
								<k:hidden property="studentSubjectId" styleId="editStudentSubjectId"/>
								<li>
									<k:label text="demo.StudentSubject.subjectCode" allowBlank="false"/>
									<k:text property="subjectCode" styleId="editSubjectCode" styleClass="text" readonly="true" validateRules="{required:true}"/>
								</li>
								<li>
									<k:label text="demo.StudentSubject.subjectName" allowBlank="false"/>
									<k:autoSelect property="subjectName" styleId="editSubjectName" styleClass="text" validateRules="{required:true}"/>
								</li>
							</ul>
						</form>
					</div>
				</div>
					
<!-- 		</div> -->